import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.stream.Collectors;

public class Test04 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
   /*     ExecutorService executorService = Executors.newFixedThreadPool(5);
      Future future = executorService.submit(()->{
            throw  new RuntimeException("Error Exception");
        });

        System.out.println(future.get());
        Thread thread = new Thread(()->{
            System.out.println("11");
        });
        thread.interrupt();*/
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
      List<Integer> list3 =  list.stream().filter(a->a>1).collect(Collectors.toList());
           //使用map其实也是过滤，比如我们现在有个学生表，然后有姓名，学号
         //年龄  ，map它的过滤只是过滤列，就是最后的结果还是与原来一样多，只不过我们就只查询学生的姓名，而filter它过滤是行了，就可以设置age>18等等的了
        System.out.println("adadada"+list3);
        List<String> list2 = new ArrayList<>();
        list2.add("NIU");
        list2.add("wangwu");

    }
}
